#include "CFileUtils.h"

#include <boost/functional/hash.hpp>

bfs::path cacheDir()
{
	bfs::path ccacheTmpDir = (bfs::temp_directory_path() /= "ccache" );
	if( !bfs::exists(ccacheTmpDir) )
		bfs::create_directories(ccacheTmpDir);
	return bfs::absolute(ccacheTmpDir);
}

std::size_t pathHash(bfs::path filePath)
{
	boost::hash<std::string> fileHash;
	std::size_t hashValue = fileHash(filePath.string());
	return hashValue;
}

bfs::path cconfigPath()
{
	bfs::path configPath = (cacheDir() /= "config");
	return configPath;
}

std::string nativeSeparator()
{
	bfs::path slash =  bfs::path( "/" ).make_preferred();
	std::string nativeSeparator = slash.string();
	return nativeSeparator;
}
